var columns =
	{ 
		datastore : new Ext.data.Store
		    ({
		        reader: new Ext.data.JsonReader(
				    {
			            root: 'rows',
			            totalProperty: 'total',
			            id: 'id'
			        },
			        [
			            'id',
			            {name: 'data',
						 mapping: 'data',
						 type: 'date',
						 dateFormat: 'Y&#45;m&#45;d H:i:s'},
			            'titulo',
			            'chamada'
			        ]),
		        remoteSort: true
		    }),
	        
		columnModel : new Ext.grid.ColumnModel
	    	([
		    	{header: 'Titulo',
		         dataIndex: 'titulo',
		         width: 100},
		        {header: 'Chamada',
		         dataIndex: 'chamada',
		         width: 200},
		        {header: 'Data',
		         dataIndex: 'data',
		         width: 80,
		         align: 'right',
		         renderer: function(value, p, r)
					{
						return String.format('{0}', value.dateFormat('H:i \\d\\e d/m/y'), r.data['data']);
					}}
	        ]),
	    
		init : function()
			{
			    this.datastore.proxy = new Ext.data.HttpProxy({url: _PHP_.grid.url.data});
				this.datastore.setDefaultSort(_PHP_.grid.sort.field, _PHP_.grid.sort.direction);
			    this.datastore.load
			    	({
			    		params: {offset: _PHP_.grid.offset, 
			    			 	 limit: 18}
			    	});
			    
			    this.columnModel.defaultSortable = true;
			   	
			   	gridX.colModel = this.columnModel;
			   	gridX.store = Ext.StoreMgr.lookup(this.datastore);
			   	gridX.getBottomToolbar().bind(this.datastore);
			   	
			   	gridX.render();
			}
	};